﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace CodePlex.KeyedList.TestProject.TestObjects
{

	[Serializable, DebuggerDisplay("{MyKey} {MyName}")]
	public abstract class ParentClass : IKeyedItem<string>
	{

		protected ParentClass()
		{
		}

		protected ParentClass(string key, string name)
		{
			this.MyKey = key;
			this.MyName = name;
		}

		public abstract string MyKey { get; set; }

		public string MyName { get; set; }


		string IKeyedItem<string>.Key
		{
			get { return this.MyKey; }
		}


	}



	public sealed class KeyedByParentClass : ParentClass
	{

		public KeyedByParentClass(string key, string name)
			: base(key, name)
		{
		}

		public override string MyKey
		{
			get;
			set;
		}

	}
}
